# April Windowing Shell System 1.0
# 13 Feb 2010

GTK_CFLAGS=`pkg-config gtk+-2.0 --cflags`
GTK_LIBS=`pkg-config gtk+-2.0 --libs`

APRIL_CFLAGS=`libapril-config --cflags`
APRIL_LIBS=`libapril-config --libs`

WNCK_LIBS=`pkg-config libwnck-1.0 --libs`
WNCK_CFLAGS=`pkg-config libwnck-1.0 --cflags`

SN_LIBS=`pkg-config libstartup-notification-1.0 --libs`
SN_CFLAGS=`pkg-config libstartup-notification-1.0 --cflags`

all : shell.o panel.o startup.o util.o explorer.o
	cc -o shell shell.o panel.o util.o explorer.o $(GTK_LIBS) $(APRIL_LIBS) -w \
	startup.o $(WNCK_LIBS) -lmetacity $(SN_LIBS) fm.o mime.o xfer.o hotkeys.o

shell.o : shell.c 
	cc -c shell.c $(GTK_CFLAGS) $(APRIL_CFLAGS) -w

panel.o : panel/panel.c
	cc -c panel/panel.c $(GTK_CFLAGS) $(APRIL_CFLAGS) -w $(WNCK_CFLAGS)

startup.o : startup.c
	cc -c $(APRIL_CFLAGS) startup.c -w

util.o : util.c
	cc -c $(APRIL_CFLAGS) util.c -w

explorer.o : explorer/explorer.c fm.o hotkeys.o
	cc -c $(APRIL_CFLAGS) explorer/explorer.c -w

clean : 
	find . -iname "*.o" -exec rm -v {} \;
	rm -v shell

fm.o : explorer/fm.c mime.o xfer.o
	cc -c $(APRIL_CFLAGS) explorer/fm.c -w

mime.o : explorer/mime.c
	cc -c $(APRIL_CFLAGS) explorer/mime.c -w

xfer.o : explorer/xfer.c
	cc -c $(APRIL_CFLAGS) explorer/xfer.c -w

hotkeys.o : explorer/hotkeys.c
	cc -c $(APRIL_CFLAGS) explorer/hotkeys.c -w
